package com.aegis.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author wuweixin
 *
 * @Version 1.0
 * @Descritube
 */
@Getter
@AllArgsConstructor
public enum PermissionTypeEnum {

    WHITE_LIST(0, "白名单"),
    CHECK_SIGN(1, "签名校验"),
    ;

    private final Integer type;
    private final String name;

    public static PermissionTypeEnum getEnum(Integer type) {
        for (PermissionTypeEnum permissionTypeEnum : PermissionTypeEnum.values()) {
            if (permissionTypeEnum.getType().equals(type)) {
                return permissionTypeEnum;
            }
        }
        return null;
    }


}
